// Fill out your copyright notice in the Description page of Project Settings.


#include "StateMachine/PlayerState/AirState.h"

#include "InputActionValue.h"
#include "Core/Character2D.h"
#include "StateMachine/StateMachine.h"

void UAirState::Init(APlayerController* Controller, ACharacter2D* Player, UStateMachine* SM)
{
	Super::Init(Controller, Player, SM);
	MovementComponent = Character->GetCharacterMovement();
}

void UAirState::InputSignal(EInputSignal Signal, const FInputActionValue& Value)
{
	Super::InputSignal(Signal, Value);
	if (Signal  ==  EInputSignal::Moving)
	{
		MoveDir = Value.Get<FVector>();
		Character->FlipSprite(MoveDir.Y);
		Character->Movement(MoveDir);
	}
	
}
